1 <md-dialog class="zohoConfiguration-dialog" aria-label="New ZohoConfiguration">
 
   2   <form name="zohoConfigurationForm" class="md-inline-form" novalidate>
 
   3     <md-toolbar class="md-accent md-hue-2">
 
   5         class="md-toolbar-tools"
 
   7         layout-align="space-between center"
 
   9         <span class="title">{{ vm.title | translate }}</span>
 
  10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
 
  12             md-font-icon="icon-close"
 
  13             aria-label="Close dialog"
 
  19     <md-dialog-content ms-scroll>
 
  20       <div class="error-list">
 
  22           ng-repeat="error in vm.errors"
 
  25           layout-align="space-between center"
 
  28             <span class="message">{{error.message}}</span>
 
  29             <span class="type">({{error.type}})</span>
 
  31           <md-button class="md-icon-button">
 
  33               md-font-icon="icon-alert-box"
 
  34               aria-label="alert error"
 
  40       <md-input-container class="md-block">
 
  41         <label translate="INTEGRATIONS.NAME">Name</label>
 
  45           ng-model="vm.zohoConfiguration.name"
 
  51           ng-messages="zohoConfigurationForm['name'].$error"
 
  52           ng-show="zohoConfigurationForm['name'].$touched"
 
  55           <div ng-message="required">
 
  56             <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
 
  57               >Name field is required</span
 
  62       <md-input-container class="md-block">
 
  63         <label translate="INTEGRATIONS.CHANNEL">Channel</label>
 
  66           ng-model="vm.zohoConfiguration.channel"
 
  69           <md-option ng-value="'voice'">
 
  70             {{ 'INTEGRATIONS.VOICE' | translate }}
 
  74           ng-messages="zohoConfigurationForm['channel'].$error"
 
  75           ng-show="zohoConfigurationForm['channel'].$touched"
 
  78           <div ng-message="required">
 
  79             <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED"
 
  80               >Channel field is required</span
 
  85       <md-input-container class="md-block">
 
  86         <label translate="INTEGRATIONS.TYPE">Type</label>
 
  87         <md-select name="type" ng-model="vm.zohoConfiguration.type" required>
 
  88           <md-option ng-value="'inbound'">
 
  89             {{ 'INTEGRATIONS.INBOUND_IN_QUEUE' | translate }}
 
  92           <md-option ng-value="'outbound'">
 
  93             {{ 'INTEGRATIONS.OUTBOUND_CALL' | translate }}
 
  97           ng-messages="zohoConfigurationForm['type'].$error"
 
  98           ng-show="zohoConfigurationForm['type'].$touched"
 
 101           <div ng-message="required">
 
 102             <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
 
 103               >Type field is required</span
 
 107       </md-input-container>
 
 109       <div class="error-list">
 
 111           ng-repeat="error in vm.errors"
 
 114           layout-align="space-between center"
 
 117             <span class="message">{{error.message}}</span>
 
 118             <span class="type">({{error.type}})</span>
 
 120           <md-button class="md-icon-button">
 
 122               md-font-icon="icon-alert-box"
 
 123               aria-label="alert error"
 
 133       layout-align="space-between center"
 
 134       ng-if="!vm.crudPermissions.readOnly"
 
 136       <div layout="row" layout-align="start center">
 
 139           ng-if="vm.crudPermissions.canEdit && !vm.newZohoConfiguration"
 
 140           ng-click="vm.saveZohoConfiguration()"
 
 141           class="send-button md-accent md-raised"
 
 142           ng-disabled="zohoConfigurationForm.$invalid || zohoConfigurationForm.$pristine"
 
 144           translate="INTEGRATIONS.SAVE"
 
 145           translate-attr-aria-label="INTEGRATIONS.SAVE"
 
 152           ng-if="vm.crudPermissions.canEdit && vm.newZohoConfiguration"
 
 153           ng-click="vm.addNewZohoConfiguration()"
 
 154           class="send-button md-accent md-raised"
 
 155           ng-disabled="zohoConfigurationForm.$invalid"
 
 157           translate="INTEGRATIONS.ADD_ZOHOCONFIGURATION"
 
 158           translate-attr-aria-label="INTEGRATIONS.ADD_ZOHOCONFIGURATION"
 
 160           ADD ZOHOCONFIGURATION
 
 165           class="md-icon-button"
 
 166           ng-if="vm.crudPermissions.canDelete && !vm.newZohoConfiguration"
 
 167           ng-click="vm.deleteZohoConfiguration($event)"
 
 170           translate-attr-aria-label="INTEGRATIONS.DELETE"
 
 172           <md-icon md-font-icon="icon-delete"></md-icon>
 
 174             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip